	function creaHelper(object,type){
			  if(type=="popover")
			  {
			  	 	
    	    	  var jqxhr = $.getJSON( "REST/getHelp/"+object.data("helper"), function(data) {
				  	 content = "Errore nel caricare i dati di Help<br>contatta l'amministrazione";
				  	 if(data!=false){
				  	 	content = $('<div />').html(data.HelpText.testo).text();
				  	 	if(data.HelpText.link!=null)
				  	 		content += '<br><small><a target="_blank" href="'+data.HelpText.link+'">'+data.HelpText.link+'</a></small>';
				  	 }
				    object.popover({
					  	delay: 0,
					  	html:true,
		    			content:content,
		    			title:data != false?data.HelpText.titolo:"ERRORE",
	    			});
	    			})
					.done(function() { console.log( "" ); })
					.fail(function( jqxhr, textStatus, error ) {
					  var err = textStatus + ', ' + error;
					  content:$('<div />').html("Errore").text(),
					  console.log( "Request Failed: " + err);
					})
					//.always(function() { console.log( "complete" ); });
    		
			  }
			  if(type=="modal")
			  {
				 object.attr("href",'REST/getHelp/'+object.data("helper")+'/modal'); 
			  }
			
    			
    		
    		
    	}
    	
    	$("[data-helper]").each(function(){
    		id_helper=$(this).data("helper");
    		type_toggle=$(this).data("toggle");
    		creaHelper($(this),type_toggle);
    	});